import React from "react";

import { Result,Button } from "antd";

import { useEffect } from "react";
import { useState } from "react";
import AdminPanel from "@/components/AdminPanel";

function NotFound() {
  let [show, setShow] = useState(false);

  useEffect(() => {
    const timer = setTimeout(() => {
      setShow(true);
    }, 2000);
    return () => clearTimeout(timer);
  }, []);
  const backHome = ()=>{
    
  }

  return (
    <div
      style={{
        opacity: show ? 1 : 0,
        transform: "all 2s",
        height: "100vh",
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
      }}
    >
      <Result
        style={{
          padding: 0,
        }}
        status="404"
        title="404"
        subTitle={`对不起, ${location.href}不存在.`}
        extra={<Button type="primary" onClick={backHome}>Back Home</Button>}
      ></Result>
    </div>
  );
}

export default NotFound